<template>
  <div>
      <p class="title">{{ info.title }}</p>
      <hr>
      <div v-html="info.content"></div>
  </div>
</template>

<script>
export default {
  created() {
    this.getInfo()
  },
  props: ["id"],
  data(){
    return{
        info:{}
    }
  },
  methods: {
      //获取图文信息
    async getInfo(){
      const { data }=await this.$http.get('/api/goods/getdesc/'+this.id)
    //   console.log(data.message)
      if(data.status===0){
          this.info=data.message[0]
      }
    }
  }
};
</script>


<style lang="scss" scoped>
    .title{
        color: #26a2ff;
        font-weight:700;
        margin: 15px 0;
        font-size:15px;
        text-align: center;
    }

</style>
